 /*                                                                      
 Copyright 2018 hzheng@gzhu.edu.cn              
                                                                         
 Licensed under the Apache License, Version 2.0 (the "License");         
 you may not use this file except in compliance with the License.        
 You may obtain a copy of the License at                                 
                                                                         
     http://www.apache.org/licenses/LICENSE-2.0                          
                                                                         
  Unless required by applicable law or agreed to in writing, software    
 distributed under the License is distributed on an "AS IS" BASIS,       
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and     
 limitations under the License.                                          
 */                                                                      
/*+***********************************************************
Filename: zh_core_v01_top.v
Description: a simple RISC-V core that execute add/sub and jump only.
Modification:
  2018.07.27 createion by Zheng Hui
  2018.12.13 remove inspect_led for GW1N9 board
************************************************************-*/

module zh_core_v01_top(
  input clk,
  input rst_n,
  output [3:0] led
);
wire sys_clk;
wire [31:0] gpio1out;
wire [3:0] inspect;

  //generate system clock
    GW_PLL ul(
        .clkout(sys_clk), //output clkout
        .clkin(clk) //input clkin
    );




  //the core
    zh_core_v02 m_core(
        .sys_clk(sys_clk), //input clk
        .rst_n(rst_n), //input reset
        .gpio1out(gpio1out), //output data
        .inspect(inspect),
        .inspect2(inspect2)
    );


 /*
assign led[3] = gpio1out[3];
assign led[2] = gpio1out[2];
assign led[1] = gpio1out[1];
assign led[0] = gpio1out[0];
 */
//assign led[3:0]=inspect[3:0];
assign led[3:0]=~gpio1out[23:20];
/*
assign led[0]=1;
assign led[1]=0;
assign led[2]=1;
assign led[3]=0;
*/
endmodule


